package JUC.fuction;

import java.util.function.Supplier;

/**
 * 供给型接口：没有参数只有返回值
 */
public class Demo04 {
    public static void main(String[] args) {
//        Supplier<String> supplier =new Supplier<String>() {
//            @Override
//            public String get() {
//                return "jhx666";
//            }
//        };

        Supplier supplier =()->{return "jhx666"; };
        System.out.println(supplier.get());
    }
}
